package io.renren.modules.sys.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import io.renren.common.utils.PageUtils;
import io.renren.common.utils.Query;

import io.renren.modules.sys.dao.DatabaseinfoDao;
import io.renren.modules.sys.entity.DatabaseinfoEntity;
import io.renren.modules.sys.service.DatabaseinfoService;


@Service("databaseinfoService")
public class DatabaseinfoServiceImpl extends ServiceImpl<DatabaseinfoDao, DatabaseinfoEntity> implements DatabaseinfoService {
    @Autowired
    private DatabaseinfoDao DatabaseinfoDao;

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        IPage<DatabaseinfoEntity> page = this.page(
                new Query<DatabaseinfoEntity>().getPage(params),
                new QueryWrapper<DatabaseinfoEntity>()
        );

        return new PageUtils(page);
    }

    @Override
    public DatabaseinfoEntity queryById(String id) {
        return DatabaseinfoDao.queryById(id);

    }
    @Override
    public List<DatabaseinfoEntity> queryAll(){
        return DatabaseinfoDao.queryAll();
    }


}
